<extend name="Public/base" />
<block name="body">
	<div class="main-title">
		<h2>网站设置</h2>
	</div>
	<style type="text/css">
		.red{
			color:red;
		}
	</style>
		<div class="tab-wrap">
			<div class="forms">
				<div id="item1" class='item'>
				<form action="__SELF__" method="post" enctype="multipart/form-data" id='theform' class="form-horizontal">
					<div class="form-item clearfix">
						<label class="item-label fl" style='line-height:28px;margin-right: 50px;'>商品标题<span class="red">*</span></label>
						<div class="controls fl">
							<input type="text" class="text input-large" name="goods_name" value="{$info.goods_name|default=''}">
						</div>
					</div>
					<br>
					<div class="form-item clearfix">
						<label class="item-label fl" style='line-height:28px;margin-right: 58px;'>商品简介</label>
						<div class="controls fl">
							<textarea type="text"  name="goods_remark" value="{$info.goods_remark|default=''}" style="width:400px;height:100px;">{$info.goods_remark|default=''}</textarea>
						</div>
					</div>
					<br>
					<div class="form-item clearfix">
						<label class="item-label fl" style='line-height:28px;margin-right: 50px;'>商品分类<span class="red">*</span></label>
						<div class="controls fl">
							<select name='parent_id_1' id="parent_id_1" onchange="javascript:get_category(this.value , 'cat_id' , 0 );">
							</select>
						</div>
						<div class="controls fl">
							<select name='cat_id' id="cat_id" data-val='{$info.cat_id}'>
								<option value="0">请选择班级</option>
							</select>
						</div>
					</div>
					<br>
					<div class="form-item clearfix">
						<label class="item-label fl" style='line-height:28px;margin-right: 26px;'>本店售价(元)<span class="red">*</span></label>
						<div class="controls fl">
							<input type="text" class="text input-small" name="shop_price" value="{$info.shop_price|default='0.00'}">
						</div>
					</div><br>
					<div class="form-item clearfix">
						<label class="item-label fl" style='line-height:28px;margin-right: 58px;'>库存数量</label>
						<div class="controls fl">
							<input type="text" class="text input-small" name="store_count" value="{$info.store_count|default='0'}">
						</div>
						<label class="redio"><small style='color:red'>虚拟物品不用填写</small></label>
					</div><br>
					<div class="form-item clearfix">
						<label class="item-label fl" style='line-height:28px;margin-right: 88px;'>排序</label>
						<div class="controls fl">
							<input type="text" class="text input-small" name="sort" value="{$info.sort|default='0'}">
						</div>
					</div><br>
					<div class="form-item clearfix">
						<label class="item-label fl" style='line-height:28px;margin-right: 58px;'>赠送积分</label>
						<div class="controls fl">
							<input type="text" class="text input-small" name="give_integral" value="{$info.give_integral|default='0'}">
						</div>
					</div><br>
					<div class="form-item clearfix">
						<label class="item-label fl" style='line-height:28px;margin-right: 58px;'>关 键 词</label>
						<div class="controls fl">
							<input type="text" placeholder="多个用，分开" class="text input-large" name="keywords" value="{$info.keywords|default=''}">
						</div>
					</div><br>
					<div id="item2" class='item'>
						<div class="form-item clearfix">
						<label class="item-label fl" style='line-height:28px;margin-right:15px;'>上传商品图片</label>
						<div class="controls fl">
							<input type="file" name='original_img[]' multiple="multiple" accept="jpg,png,jpeg,gif">
						</div>
						<label class="redio"><small style='color:red'>按ctrl键选择多张图片</small></label>
					</div><br>
					<style type="text/css">
						table{
								text-align: center;
								margin-left: 105px;
							}
						tr td{
							padding:2px;
						}
					</style>
					<div class="form-item">
						<div class="form-item clearfix">
							<label class="item-label fl" style='line-height:28px;margin-right:15px;'>属性设置</label>
						<table border="1">
							<thead>
								<tr>
									<td>是否上架</td>
									<td>是否是虚拟物品</td>
									<td>是否包邮</td>
									<td>是否推荐</td>
									<td>是否是新品</td>
									<td>是否热卖</td>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td>
										<input type="checkbox" name="is_on_sale" value="1" <eq name='info.is_on_sale' value='1'>checked</eq> >
									</td>
									<td>
										<input type="checkbox" name="is_real" value="1" <eq name='info.is_real' value='1'>checked</eq> >
									</td>
									<td>
										<input type="checkbox" name="is_free_shipping" value="1" <eq name='info.is_free_shipping' value='1'>checked</eq> >
									</td>
									<td>
										<input type="checkbox" name="is_recommend" value="1" <eq name='info.is_recommend' value='1'>checked</eq> >
									</td>
									<td>
										<input type="checkbox" name="is_new" value="1" <eq name='info.is_new' value='1'>checked</eq> >
									</td>
									<td>
										<input type="checkbox" name="is_hot" value="1" <eq name='info.is_hot' value='1'>checked</eq> >
									</td>
								</tr>
							</tbody>
						</table>
						</div>
					</div>
					<div class="form-item clearfix">
						<label class="item-label fl" style='line-height:28px;margin-right:15px;'>商品详情描述</label>
						<div class="controls fl">
							<label class="textarea">
		                        <textarea name="goods_content" value="{$info.goods_content}">{$info.goods_content}</textarea>
		                        {:hook('adminArticleEdit' , array('name' => 'goods_content'))}
	                        </label>
						</div>
					</div><br>
					</div>
					</div>
					<div class="form-item clearfix">
						<notempty name='Think.get.id'>
							<input type="hidden" name='goods_id' value="{$Think.get.id}">
						</notempty>
						<button class="btn submit-btn " id="submit" type="submit" target-form="form-horizontal">确 定</button>
           				<button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
					</div>
				</form>
			</div>
		</div>
</block>
<block name="script">
	<script type="text/javascript">
			var cat = '{$info.cat_id}';
			var parent = '{$info.parent_id}' ; 
			 $(function(){
			 	if(parent != 0 || parent != ''){
			 		get_category(0 , 'parent_id_1', parent , setcat );
			 	}
			 	if(cat == '' && parent == ''){
			 		get_category(0 , 'parent_id_1', 0  );
			 	}
			 	highlight_subnav('{:U('Shop/goodslist')}');
			 });

		 function setcat(){
		 		get_category(parent , 'cat_id', cat );
		 }

		 


	</script>
</block>